<%if @item%>
<h1>Editing item</h1>
<% @check_options = {:disabled=>"disabled"} %>
<% @desc_options = {:readonly=>"readonly",:size => 40} %>
<% @activ_options = {:disabled=>"disabled"} %>
<% if  @rolle == "owner"%>
<% @check_options = {}%>
<% @desc_options = {}%>
<% @activ_options = {}%>
<% elsif  @rolle == "checker"%>
<% @check_options = {}%>
<%end%>
<% form_for(@item) do |f| %>
  <%= f.error_messages %>
<input type="hidden" id="auth_token" name="r" value=<%="#{params[:r]}"%> />
<table>
  <tr>
    <th>Checked</th>
    <th>Description</th>
    <th>Activ</th>
  </tr>
  <tr>
    <td><%=f.check_box(:check,@check_options) %></td>
    <td><%=f.text_field(:description, @desc_options) %></td>
    <td><%=f.check_box(:activ,@activ_options) %></td>
  </tr>
  </table>
  <p>
    <%= f.submit 'Update' %>
  </p>
<% end %>

<%= link_to 'Show', "items/#{@item.id}?r=#{params[:r]}" %> |
<%= link_to 'Back', "items?r=#{params[:r]}" %>
<%else%>
NOT FOUND
<%end%>